﻿@{
    ViewBag.Title = "小博客留言板";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using MyBlog
@model PagedList<MessageModel>
<link href="~/Content/Blog/sysmsg.css" rel="stylesheet" />
<div class="sys-msg-header">
    <div class="sys-msg-header-left">
        留言板(<span id="spcount">@Model.TotalItemCount</span>)
    </div>
    <div class="sys-msg-header-mid">
        欢迎来这里灌水和吐槽，需要友链的请留言哦^_^
    </div>
    <div class="sys-msg-header-right"><span onclick="goSend()">我要留言 <i class="icon-edit"></i></span></div>
</div>
<div id="dvmsglist">
    @Html.Partial("_SysMessageManager", Model)
</div>
<div id="dvsend" class="sys-msg-send">
    <div class="sys-msg-send-tip">
        发表留言
    </div>
    @if (UserSession.LoginUserInfo == null)
    {
        if (WebCache.AllowAnonymous)
        {
            <div class="sys-msg-login">
                系统提示：管理员已开启游客发言权限，若要使用评论回复等更多功能请先
                <a href="@Url.Content("~/account/login?ReturnUrl="+Request.Url)">
                    [登录]
                </a>或前往<a href="@Url.Content("~/account/register")">[注册]</a>
            </div>
                <div class="sys-msg-visitor">
                    <span>您的姓名：</span>
                    <input maxlength="20" class="inputbox inputFilter" type="text" id="txtvistor" /><label class="red">*</label>
                </div>
                <div class="sys-msg-visitor">
                    <span>您的Email：</span>
                    <input title="有回复我们将第一时间通过邮件通知您" maxlength="50" class="inputbox inputFilter" type="text" id="txtvistorEmail" /><label class="red">*</label>
                </div>
        }
        else
        {
            Html.RenderAction("_LoginTip", "system");
            <input type="hidden" id="hCheck" value="true" />
        }
    }
    else
    {
        @:当前用户：<span>@UserSession.LoginUserInfo.NickName</span>
            <input type="hidden" name="VisitUid" id="txtuid" value="@UserSession.LoginUserInfo.Account" />
    }
    <script id="content" name="content" style="height:200px; margin-top:10px; width:99%; margin-bottom:10px;" type="text/plain">
    </script>
    <input type="button" id="btnok" value="发表" class="btnsubmit" />
</div>
<script src="~/Scripts/Blog/sysmsg.js"></script>
<script src="~/Scripts/mailAutoComplete.js"></script>

@section scripts{
    @{Html.RegisterMvcPagerScriptResource();}
}